<template id="head">
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
  <title>Webduino Blockly - 點擊按鈕開關玩賽跑小遊戲</title>
  <!-- webduino -->
  <script src="https://webduino.io/components/webduino-js/dist/webduino-all.min.js"></script>
  <script src="https://blockly.webduino.io/webduino-blockly.js"></script>
  <script src="https://blockly.webduino.io/lib/runtime.min.js"></script>
</template>
<template id="body">
  <br/>
  先到 <span id="goal"></span> 的贏
  <br/><br/>
  電腦：<span id="npcshow">0</span>
  <br/>
  玩家：<span id="usershow">0</span> 
  <br/>
  <br/>
  <div id="npc"><img id="npcimg" src="http://webduinoio.github.io/webduino-blockly/media/tutorials/run-cat.gif"></div>
  <div id="user"><img id="userimg" src="http://webduinoio.github.io/webduino-blockly/media/tutorials/run-lion.gif"></div>  
  <button id="start" class="go">比賽開始</button> 
</template>
<template id="css">
#start{
  font-size:30px;
  display:block;
  padding:10px;
  margin:10px auto;
}
#start.go{
  display:none;
}
#npc, #user{
  transition:.3s;
}
#npc img{
  width:100px;
  transform:scaleX(-1);
}
#user img{
  width:100px;
  transform:scaleX(-1);
}
</template>
